home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
savage.zip
/
SAV6HRT.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-04-03
|
793b
|
34 lines
program savage; { 3/30/91, 9/9/89, ljr }
uses tphrt; { RYLE's }
const
iloop = 2500;
var
hits, elapsed, i : longint;
a : real;
function tan (a:real) : real;
begin
tan := sin (a) / cos (a);
end;
begin
a := 1.0;
t_start; { init the timer }
write('SAVAGE (MATH) BENCHMARK ');
write('start...');
t_entry(1); { start the timer }
for i := 1 to iloop do begin
a := tan(arctan(exp(ln(sqrt(a * a))))) + 1;
end;
t_exit(1); { stop the timer }
t_stop; { un-init the timer }
t_ask_timer(1,hits,elapsed);
write('stop! ');
writeln ('Elapsed time was ',
(elapsed/1000000.0):10:6,' seconds.');
end.